package com.hunt.service.impl;

import com.hunt.dao.IpoDataMapper;
import com.hunt.model.dto.PageInfo;
import com.hunt.model.entity.IpoStock;
import com.hunt.service.IpoStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class IpoStockServiceImpl  implements IpoStockService {
    @Autowired
    private IpoDataMapper ipoDataMapper;

    @Override
    public PageInfo getIpoStock(String type, String orderfield, String sort, String position, String size) {
        int count = ipoDataMapper.selectIpoDateCount(type);
        List<IpoStock> list = ipoDataMapper.selectIpoDate( type,  orderfield,
                sort,position,  size);;
        PageInfo pageInfo=new PageInfo(count,list);
        return pageInfo;
    }
}
